<template>
  <div class="modelrecord">
    <el-dialog title="订单记录" :visible.sync="dialogRecord" width="50%">

      <el-table
        :data="tableData"
        class="table"
        stripe border
        ref="multipleTable"
        :header-cell-style="{background:'#f3f3f3',textAlign: 'center'}"
        :cell-style="{ textAlign: 'center' }"><!--:data="用于存放请求数据回来的数组" -->
        <el-table-column prop="billno" label="单据编号">
        </el-table-column>
        <el-table-column prop="oper_record" label="操作记录">
        </el-table-column>
        <el-table-column prop="oper_time" label="操作时间">
        </el-table-column>
      </el-table>

      <div slot="footer" class="ban-btn">
        <el-button @click="dialogRecord = false">取 消</el-button>
        <el-button class="save" @click="ok('form')">提 交</el-button>
      </div>
    </el-dialog>
  </div>

</template>

<script>
export default {
  name: 'ModelRecord',
  props:{
    rows:{}
  },
  data() {
    return {
      dialogRecord: false,
      tableData: [
        {
          billno: '',
          oper_record: '',
          oper_time: ''
        }
      ]
    }
  },
  created() {
  },

  methods:{
    //打开对话框
    openRecord() {
      this.dialogRecord = true;
      this.tableData = [
        {
          billno: this.rows.billno,
          oper_record: '订单生成',
          oper_time: this.rows.bill_date
        }
      ]
    },
    //保存表单
    ok () {
      this.$refs['form'].validate(valid => {
        if (valid) {
          console.log(this.form)
          this.$message.success('保存成功')
        } else {
          this.$message.error('表单验证失败!')
        }
      })
    }
  }
}
</script>

<style>
</style>
